<template>
	<view class="content">
		<view class="tupian">
			<image mode="widthFix" style="width:100%; height: 100%;" :src="location + '/new_app/gift/wy2025/jsTop.jpg'">
			</image>
		</view>
		<view id="main_content">
			<view class="zhongjian" v-if="status == 1">
				<view v-if="user == ''" style="font-size: 35rpx; margin-left: 30rpx; margin-right: 30rpx;
				margin-top: 20rpx; margin-bottom: 50rpx; color: white; font-weight: bold;">
					系统未检测到您的登录信息，请重新登录！
				</view>
				<view v-else>
					<view style="display: flex; align-items: center;">
						<view style="font-size: 40rpx; margin-left: 40rpx; margin-top: 20rpx; margin-bottom: 40rpx; 
						color: white; font-weight: bold;">
							{{user.name}}
						</view>
						<view @click="renovate" style="font-size: 30rpx; background-color: rgba(255, 255, 255, 0.5); border-radius: 15rpx; 
						margin-top: -10rpx; margin-left: 40rpx; padding: 8rpx 25rpx;">刷新</view>
					</view>
					<view v-if="memberData == null" class="xuanze" style="font-size: 50rpx; margin-left: 40rpx; margin-top: 25rpx;
					margin-bottom: 40rpx; color: white; font-weight: bold;">
						请选择方案（A / B）：</view>
					<view v-else>
						<view v-if="memberData.data1 == '用户取消' || memberData.status == 9" class="xuanze" style="font-size: 50rpx; margin-left: 40rpx; margin-top: 25rpx;
						margin-bottom: 40rpx; color: white; font-weight: bold;">
							请选择方案（A / B）：</view>
					</view>
					<view v-if="memberData != null && memberData.data1 != '用户取消' && memberData.status != 9" style="font-size: 40rpx; margin-left: 40rpx; margin-top: 25rpx;
						margin-bottom: 15rpx; color: white; font-weight: bold;">
						您已选择方案({{memberData.data1}}) ！
					</view>
				</view>
				<view class="xuanxiang" v-if="memberData === null">
					<view class="kuai">
						<button @click="particulars('A')">查看方案A详情</button>
						<image style="width: 345rpx; height: 345rpx;" @tap="select(1)"
							:src="location + '/new_app/gift/wy2025/xuanA.jpg'">
						</image>
					</view>
					<view class="kuai">
						<button @click="particulars('B')">查看方案B详情</button>
						<image style="width: 345rpx; height: 345rpx;" @tap="select(2)"
							:src="location + '/new_app/gift/wy2025/xuanB.jpg'">
						</image>
					</view>
				</view>
				<view class="xuanxiang" v-else>
					<view class="kuai" v-if="memberData != null && memberData.data1 == 'A'">
						<button @click="particulars('A')">查看方案A详情</button>
						<image style="width: 345rpx; height: 345rpx;" @tap="select(1)"
							:src="location + '/new_app/gift/wy2025/xuanA2.jpg'"></image>
					</view>
					<view class="kuai" v-else>
						<button @click="particulars('A')">查看方案A详情</button>
						<image style="width: 345rpx; height: 345rpx;" @tap="select(1)"
							:src="location + '/new_app/gift/wy2025/xuanA.jpg'">
						</image>
					</view>
					<view class="kuai" v-if="memberData != null && memberData.data1 == 'B'">
						<button @click="particulars('B')">查看方案B详情</button>
						<image style="width: 345rpx; height: 345rpx;" @tap="select(2)"
							:src="location + '/new_app/gift/wy2025/xuanB2.jpg'">
						</image>
					</view>
					<view class="kuai" v-else>
						<button @click="particulars('B')">查看方案B详情</button>
						<image style="width: 345rpx; height: 345rpx;" @tap="select(2)"
							:src="location + '/new_app/gift/wy2025/xuanB.jpg'">
						</image>
					</view>
				</view>
				<view class="form" v-if="fanganxuanze == 'A'">
					<view class="" v-if="memberData == null">
						<view class="psfs">
							<view style="color: white;">选择领取方式：</view>
							<view class="fangshi" :class="this_index == 0 ? 'this_bg' : 'defu_bg'"
								@click="switchover(0)">
								自提
							</view>
							<view class="fangshi" :class="this_index == 1 ? 'this_bg' : 'defu_bg'"
								@click="switchover(1)">
								邮寄
							</view>
						</view>
						<view v-if="this_index == 0" class="ziti" style="">
							<view class="ztdidian">
								<view style="color: white; width: 175rpx;">自提地点：</view>
								<uni-data-select style="background-color: white; border-radius: 12rpx;" v-model="value"
									:localdata="places" @change="change2" :clear="false">
								</uni-data-select>
							</view>
							<button v-if="meantime == 0 && loadedOk == 0 && clicks < 1" class="queren" @tap="ok_A"
								style="margin-top: 100rpx;">确认选择A-自提</button>
						</view>
						<view v-if="this_index == '1'" class="youji">

							<view class="xlk">
								<view style="color: white; width: 175rpx;">选择快递：</view>
								<uni-data-select style="background-color: white; border-radius: 12rpx;" v-model="value"
									:localdata="ranges" @change="change1" :clear="false">
								</uni-data-select>
							</view>
							<view class="heng">
								<text>收货人：</text>
								<input type="text" v-model="message.name" placeholder="请输入姓名">
							</view>
							<view class="heng">
								<text>手机号码：</text>
								<input type="text" v-model="message.phone" maxlength="11" placeholder="请输入11位数字">
							</view>
							<pickers style="margin-bottom: 40rpx;" @address="address"
								:defaultAddress="message.defaultAddress">
								<view class="quyu">
									<view class="text">所在地区：</view>
									<view class="diqu">
										<view class="diqu1">{{message.defaultAddress[0]}}</view>
										<text style="width: 10rpx;"></text>
										<view class="diqu2">{{message.defaultAddress[1]}}</view>
										<text style="width: 10rpx;"></text>
										<view class="diqu3">{{message.defaultAddress[2]}}</view>
										<image style="width: 40rpx; height: 40rpx; position: absolute; right: 50rpx"
											src="@/static/wugong/label.png"></image>
									</view>
								</view>
							</pickers>
							<view class="heng" style="margin-bottom: 60rpx;">
								<!--  @click="meantime=0;loadedOk=0;clicks=0" -->
								<text>详细地址：</text>
								<input type="text" v-model="message.location" placeholder="请输入详细地址">
							</view>
							<!--  v-if="meantime == 0 && loadedOk == 0 && clicks < 1" -->
							<button v-if="meantime == 0 && loadedOk == 0 && clicks < 1" class="queren"
								@tap="ok_A">确认选择A-邮寄</button>
						</view>
					</view>
				</view>
				<view class="form" v-if="fanganxuanze == 'A'">
					<view class="" v-if="memberData != null && memberData.data1 == '用户取消'">
						<view class="psfs">
							<view style="color: white;">选择领取方式：</view>
							<view class="fangshi" :class="this_index == 0 ? 'this_bg' : 'defu_bg'"
								@click="switchover(0)">
								自提
							</view>
							<view class="fangshi" :class="this_index == 1 ? 'this_bg' : 'defu_bg'"
								@click="switchover(1)">
								邮寄
							</view>
						</view>
						<view v-if="this_index == 0" class="ziti" style="">
							<view class="ztdidian">
								<view style="color: white; width: 175rpx;">自提地点：</view>
								<uni-data-select style="background-color: white; border-radius: 12rpx;" v-model="value"
									:localdata="places" @change="change2" :clear="false">
								</uni-data-select>
							</view>
							<button v-if="meantime == 0 && loadedOk == 0" class="queren" @tap="ok_A"
								style="margin-top: 100rpx;">确认选择A-自提</button>
						</view>
						<view v-if="this_index == '1'" class="youji">
							<view class="xlk">
								<view style="color: white; width: 175rpx;">选择快递：</view>
								<uni-data-select style="background-color: white; border-radius: 12rpx;" v-model="value"
									:localdata="ranges" @change="change1" :clear="false">
								</uni-data-select>
							</view>
							<view class="heng">
								<text>收货人：</text>
								<input type="text" v-model="message.name" placeholder="请输入姓名">
							</view>
							<view class="heng">
								<text>手机号码：</text>
								<input type="text" v-model="message.phone" maxlength="11" placeholder="请输入11位数字">
							</view>
							<pickers style="margin-bottom: 40rpx;" @address="address"
								:defaultAddress="message.defaultAddress">
								<view class="quyu">
									<view class="text">所在地区：</view>
									<view class="diqu">
										<view class="diqu1">{{message.defaultAddress[0]}}</view>
										<text style="width: 10rpx;"></text>
										<view class="diqu2">{{message.defaultAddress[1]}}</view>
										<text style="width: 10rpx;"></text>
										<view class="diqu3">{{message.defaultAddress[2]}}</view>
										<image style="width: 40rpx; height: 40rpx; position: absolute; right: 50rpx"
											src="@/static/wugong/label.png"></image>
									</view>
								</view>
							</pickers>
							<view class="heng" style="margin-bottom: 60rpx;">
								<!--  @click="meantime=0;loadedOk=0;clicks=0" -->
								<text>详细地址：</text>
								<input type="text" v-model="message.location" placeholder="请输入详细地址">
							</view>
							<!--  v-if="meantime == 0 && loadedOk == 0 && clicks < 1" -->
							<button v-if="meantime == 0 && loadedOk == 0 && clicks < 1" class="queren"
								@tap="ok_A">确认选择A-邮寄</button>
						</view>
					</view>
				</view>
				<view class="" v-if="fanganxuanze == 'B'">
					<view class="" v-if="memberData == null">
						<view style="color: #fff; font-size: 50rpx; text-align: center; margin-top: 40rpx;">
							是否选择<strong>B</strong>方案，请确认</view>
						<button v-if="meantime == 0 && loadedOk == 0 && clicks < 1" class="queren"
							@click="openB">确认选择</button>
					</view>
				</view>
				<view class="" v-if="fanganxuanze == 'B'">
					<view class="" v-if="memberData != null && memberData.data1 == '用户取消'">
						<view style="color: #700A08; font-size: 50rpx; text-align: center; margin-top: 40rpx;">
							您当前选择的方案为<strong>B</strong>方案</view>
						<button v-if="meantime == 0 && loadedOk == 0 && clicks < 1" class="queren"
							@click="openB">确认选择</button>
					</view>
				</view>
				<view v-if="memberData != null && memberData.data1 == 'A'"
					:class="memberData.data2 == 0? 'pickUp' : 'mail'" style="margin-top: 50rpx;">
					<view style="color: #950500; font-weight: bold;">
						<view style="margin-bottom: 8rpx; font-size: 35rpx;">
							领取方式：{{memberData.data2 == 0?"自提":"邮寄"}}
						</view>
						<view v-if="memberData.data2 == 0" style=" font-size: 35rpx;">
							自提地点：{{memberData.data3}}
						</view>
						<view v-if="memberData.data2 == 1" style="margin-bottom: 8rpx; font-size: 35rpx;">
							邮寄公司：{{memberData.data4}}
						</view>
						<view v-if="memberData.data2 == 1" style="font-size: 34rpx;">
							<view style="margin-bottom: 8rpx;">收货人：{{memberData.data3.name}}</view>
							<view style="margin-bottom: 8rpx;">手机号：{{memberData.data3.phone}}</view>
							<view style="margin-bottom: 8rpx;">地区：{{memberData.data3.city}}</view>
							<view style="margin-bottom: 10rpx;">详细地址：{{memberData.data3.address}}</view>
						</view>
					</view>
					<view v-if="memberData.data1 != '用户取消' && memberData.data2 == 1">
						<view v-if="memberData.status != 1">
							<button @click="pay_confirm()" type="primary"
								style="color: white; margin: 0 15rpx; border: none;">
								支付快递费{{memberData.data3.price}}元
							</button>
						</view>
						<view v-else
							style="text-align: center;font-size: 35rpx; margin-top: 20rpx; color: white; font-weight: bold;">
							快递费已支付
						</view>
					</view>
				</view>
				<view v-if="memberData != null && memberData.courier_number != null" style="padding-top: 20rpx;">
					<button class="queren" v-if="memberData.data1 == 'A' && memberData.data2 == 1"
						@click="logistics()">查看物流</button>
				</view>
				<view v-if="memberData != null &&  user != '' && today != 0 && meantime != 1"
					style="padding-top: 20rpx;">
					<button class="queren" @click="cancel()">取消选择</button>
				</view>
			</view>
		</view>

		<!-- 悬浮窗 -->
		<uni-fab :pattern="pattern" horizontal="right" vertical="top" :popMenu="false" @fabClick="fabClick"
			text="联系客服"></uni-fab>

		<!-- 过期提示＋邮寄提示 -->
		<gui-popup ref="guimodal2" :canCloseByShade="false">
			<view style="background-color: white; width: 550rpx; margin: 0 auto; border-radius: 10rpx;">
				<view class="" style="padding-top: 30rpx; font-size: 35rpx; text-align: center;">提示</view>
				<view style="padding: 20rpx 20rpx 40rpx 30rpx; font-size: 32rpx; font-weight: bold;">
					<!-- <view style="text-indent: 2em;">2025年工会会员五一慰问选取时间尚未开始或已经结束，开始时间为: 2025年03月28日09:00:00</view> -->
					<view style="text-indent: 2em;">“2025年工会会员五一节日慰问选择券”不在选取时间内，选取时间为: 2025年03月28日09:00:00~2025年4月6日23:59:59</view>
					<view style="text-indent: 2em;">邮寄支付开启时间为: 2025年04月09日09:00:00~2025年04月17日23:59:59</view>
					<!-- <view style="text-indent: 2em;">
						注意：部分职工无法支付邮费或已经支付邮费未更新状态的问题目前已经在处理当中，待与银行对帐完成后统一对状态进行处理，已经选邮寄用户无需取消订单。系统将于晚些时侯重新开放邮费补支付通道，预计开放时间：25年1月4日早上10点~1月8日晚上0点。
					</view> -->
				</view>
				<!-- <view class="gui-color-gray" style="padding: 25rpx 45rpx; line-height: 1.5;">
					<text style="margin-left: 60rpx;">物资选取方案时间已过，请注意套餐使用及领取时间。</text>
					<br>
					<text style="margin-left: 60rpx; color: red;">2024年8月21日09:00:00开放邮寄支付，支付时间: 8月21日 ~ 26日，每日23:00:00
						~ 次日01:00:00为银行对账时间，不开放邮寄支付。</text>
				</view> -->
				<view @tap="guiClose"
					style="color: #317CFF; text-align: center; padding: 20rpx 0; border-top:  1px solid #ccc;">
					确认
				</view>
			</view>
		</gui-popup>

		<!-- 支付提示 -->
		<gui-popup ref="guimodal1" :canCloseByShade="false">
			<view class="" v-if="memberData != null && memberData.data1 == 'A'"
				style="background-color: white; width: 550rpx; margin: 0 auto; border-radius: 10rpx;">
				<view class="" style="padding-top: 30rpx; font-size: 35rpx; text-align: center;">温馨提示</view>
				<view class="gui-color-gray" style="padding: 25rpx 45rpx; line-height: 1.5;">
					<text style="margin-left: 60rpx;">跳转小程序后请按提示</text>
					<text
						style="color: red;">填入您的厂牌号，支付完成后请耐心等待，显示支付成功后可返回柳钢之家APP刷新邮寄订单状态。</text>
					<br>
					<text style="margin-left: 60rpx;">如有其他问题请联系工会或点击联系客服，也可在工作时间拨打电话:
						15307720128咨询。请勿在微信小程序平台及商户缴费平台上投诉，否则将影响本次及之后物供邮寄选择。</text>
					<br>
					<text style="color: red; margin-left: 60rpx;">该地区邮费为{{memberData.data3.price}}元，您确定选择支付吗？</text>
				</view>
				<view style="display: flex; border-top:  1px solid #ccc;">
					<view @tap="cancel_pay"
						style="width: 50%; color: #317CFF; text-align: center; padding: 20rpx 0;">
						取消
					</view>
					<view @tap="confirm_pay" style="width: 50%; color: #317CFF; text-align: center; padding: 20rpx 0; border-left:  1px solid #ccc;">
						确认
					</view>
				</view>
			</view>
		</gui-popup>

		<!-- 顺丰物流提示 -->
		<gui-popup ref="guimodal_courier_umber" :canCloseByShade="false">
			<view class="" v-if="memberData != null && memberData.data1 == 'A'"
				style="background-color: white; width: 550rpx; margin: 0 auto; border-radius: 10rpx;">
				<view class="" style="padding-top: 30rpx; font-size: 35rpx; text-align: center;">提示</view>
				<view class="gui-color-gray" style="padding: 25rpx 45rpx; line-height: 1.5;">
					顺丰快递可根据单号到顺丰小程序或顺丰app查询。您的单号为:<text
						style="color: red; margin-left: 10rpx;">{{SF_courier_umber}}</text>
				</view>
				<view style="border-top:  1px solid #ccc;">
					<view @tap="courier_umber_notarize"
						style="width: 100%; color: #317CFF; text-align: center; padding: 20rpx 0;">
						确认
					</view>
				</view>
			</view>
		</gui-popup>

		<!-- 选择邮寄提示 -->
		<gui-popup ref="guimodal_mail1" :canCloseByShade="false">
			<view style="background-color: white; width: 550rpx; margin: 0 auto; border-radius: 10rpx;">
				<view class="" style="padding-top: 30rpx; font-size: 35rpx; text-align: center;">提示</view>
				<view class="gui-color-gray" style="padding: 25rpx 45rpx; line-height: 1.5;">
					您好，目前的物流费用为预收费用。具体发货时间在4月23日左右，届时职工可在“2025年工会会员五一慰问物资领取券”里查看物流状态更新情况。
					<text style="color: red; margin-left: 10rpx;">请勿在微信平台选择投诉，否则将可能影响订单变更为自提领取。仍有疑问可咨询本单位工会或联系客服。</text>
				</view>
				<view style="border-top:  1px solid #ccc;">
					<view @tap="notarize_mail1"
						style="width: 100%; color: #317CFF; text-align: center; padding: 20rpx 0;">
						确认
					</view>
				</view>
			</view>
		</gui-popup>

		<!-- 选择邮寄确认提示 -->
		<gui-popup ref="guimodal_mail2" :canCloseByShade="false">
			<view style="background-color: white; width: 550rpx; margin: 0 auto; border-radius: 10rpx;">
				<view class="" style="padding-top: 30rpx; font-size: 35rpx; text-align: center;">提示</view>
				<view class="gui-color-gray" style="padding: 25rpx 45rpx; line-height: 1.5;">
					您好，目前的物流费用为预收费用。具体发货时间在4月23日左右，届时职工可在“2025年工会会员五一慰问物资领取券”里查看物流状态更新情况。
					<text style="color: red; margin-left: 10rpx;">请勿在微信平台选择投诉，否则将可能影响订单变更为自提领取。仍有疑问可咨询本单位工会或联系客服。</text>
				</view>
				<view style="border-top:  1px solid #ccc;">
					<view @tap="notarize_mail2"
						style="width: 100%; color: #317CFF; text-align: center; padding: 20rpx 0;">
						确认
					</view>
				</view>
			</view>
		</gui-popup>

		<view class="tupian">
			<image mode="widthFix" style="width: 100%; height: 100%;"
				:src="location + '/new_app/gift/wy2025/jsBottom.jpg'" alt="">
			</image>
		</view>
	</view>
</template>

<script>
	var sweixin;
	import pickers from "@/components/ming-picker/ming-picker.vue"
	export default {
		components: {
			pickers
		},
		data() {
			return {
				// astrict: 0,
				clicks: 0,
				location: 'https://boyaltd.oss-cn-hangzhou.aliyuncs.com',
				today: '',
				msg: '',
				memberData: null,
				meantime: '',
				loadedOk: 1,
				user: null,
				status: '',
				fanganxuanze: null,
				this_index: 0,
				value: null,
				ranges: [{
						id: 1,
						name: "德邦快递"
					},
					{
						id: 2,
						name: "顺丰快递"
					},
					{
						id: 3,
						name: "邮政快递"
					},
				],
				message: {
					range: '',
					name: '',
					phone: '',
					location: '',
					defaultAddress: ["广西壮族自治区", "柳州市", "柳北区", '17.2', '21', '19.5'],
					price: ''
				},
				places: [{
						id: 1,
						name: '非钢大院雀丰商贸公司仓库'
					},
					{
						id: 2,
						// text: '广西钢铁基地内'
						name: '惠享超市-广西钢铁店'
					},
					{
						id: 3,
						// text: '中金公司旧职工食堂'
						name: '中金公司厂前区办公楼一楼'
					}
				],
				place: '',
				card_id: null,
				type: null,
				system: null,
				sweixin: '',
				couponId: [],
				order_id: null,
				pattern: {
					color: '#7A7E83',
					backgroundColor: '#fff',
					selectedColor: '#007AFF',
					buttonColor: 'rgba(255, 255, 255, 0.5)',
					iconColor: '#007AFF',
					icon: 'staff-filled',
				},
				SF_courier_umber: null,
			}
		},
		onLoad(opt) {
			let self = this
			uni.showLoading({
				title: '正在获取用户选择方案...'
			});
			let info = uni.getSystemInfoSync();
			self.system = info.platform;
			if (opt.Bearer) {
				uni.setStorageSync("Bearer", opt.Bearer);
				self.bearer();
			} else if (opt.code) {
				self.loginx(code);
			} else {
				let user = uni.getStorageSync("member");
				this.user = user;
				console.log("indexwy->load", JSON.stringify(user));
				self.audit();
				self.getData();
				self.timeLimit();
				// self.WeChat();
			}
			console.log('user: ', self.user);

			// 查自提券
			// let url = '/app/wallet_log'
			// let name = '2025年工会会员春节慰问自提券'
			// let parm = {
			// 	type: name,
			// 	money: 0.00,
			// }
			// self.$boya.NPost(url, parm, function(res) {
			// 	console.log('已有自提券：', res);
			// }, err => {
			// 	console.log("getBlogErr: ", err);
			// }, false, false)

			// 发B套餐卡券
			// let urlB = '/app/wallet_add'
			// let parmB = {
			// 	type: '2025年工会会员春节慰问自提券',
			// 	money: 200,
			// }
			// self.$boya.NPost(urlB, parmB, function(res) {
			// 	console.log("setBadd", res.data);
			// }, false, false)

			// 删除卡券
			// let url = '/app/wallet_remove'
			// let parm = {
			// 	type: '2025年工会会员春节慰问自提券',
			// 	money: 200,
			// }
			// self.$boya.NPost(url, parm, function(res) {
			// 	console.log("setBremove", res.data);
			// 	self.$boya.msg('取消成功！');
			// })

			// 删除优惠券
			// let couponId = [528148, 528147, 528146, 528145]
			// for (var i = 0; i < couponId.length; i++) {
			// 	let urlA = '/app/card_bag/coupon_remove'
			// 	let parmA = {
			// 		id: couponId[i]
			// 	}
			// 	self.$boya.NPost(urlA, parmA, function(res) {
			// 		console.log("setAremove: ", res.data);
			// 	})
			// }
		},
		onShow() {
			//支付返回后检查是否支付成功
			if (this.order_id) {
				this.$refs.guimodal2.close();
				uni.showLoading({
					title: '正在检查支付数据...'
				});
				this.getData();
			}
		},
		methods: {
			bearer() {
				let self = this
				this.$boya.NGet("/app/auth/user", null, function(res) {
					console.log("bearer: ", res);
					uni.hideLoading();
					self.user = res.data.member;
					uni.setStorageSync("member", res.data.member);
					uni.showToast({
						title: '加载物供信息',
						duration: 1000,
						icon: 'loading'
					})
					self.audit();
					self.getData();
					self.timeLimit();
				}, err => {
					console.log('bearerErr: ', err);
					uni.showToast({
						title: '登录失败,请重试',
						duration: 2000,
						icon: 'error'
					});
				}, false, false)
			},
			loginx(code) {
				let self = this
				console.log('code: ', code);
				self.$boya.NPost('/tpi/loginx', {
					code: code
				}, function(res) {
					console.log("loginx", res);
					if (res.code == 200) {
						self.user = res.data.user;
						uni.setStorageSync("member", res.data.user);
						uni.setStorageSync("Bearer", res.data.token);
						uni.showToast({
							title: '加载物供信息',
							duration: 1000,
							icon: 'loading'
						})
						self.audit();
						self.getData();
						self.timeLimit();
						// self.WeChat();
					} else {
						uni.showToast({
							title: '登录失败,请重试',
							duration: 2000,
							icon: 'error'
						});
					}
				}, false)
			},
			WeChat() {
				// #ifdef APP-PLUS
				plus.share.getServices(function(s) {
					console.log("获取分享服务列表成功：" + s);
					var shares = {};
					for (var i = 0; i < s.length; i++) {
						var t = s[i];
						console.log(t);
						shares[t.id] = t;
						console.log(t.id);
					}
					sweixin = shares['weixin'];
				}, function(e) {
					console.log("获取分享服务列表失败：" + e.message);
				});
				//#endif
			},
			// 悬浮窗跳转客服
			fabClick() {
				console.log('点击了悬浮按钮');
				let appid = "gh_edf4ceb10043";
				let path = "pages/service/service"
				uni.hideLoading();
				// #ifdef H5
				console.log("H5H5H5H5H5H5H5H5");
				uni.webView.postMessage({
					data: {
						type: "open_wexin",
						data: {
							app_id: appid,
							path: path
						}
					},
				})
				// #endif
				// #ifdef APP-PLUS
				console.log("APP-PLUSAPP-PLUSAPP-PLUS");
				sweixin ? sweixin.launchMiniProgram({
					id: appid,
					path: path
				}) : plus.nativeUI.alert('当前环境不支持微信操作!');
				// #endif
			},
			// 跳转方案详情页
			particulars(index) {
				console.log('index:', index);
				uni.navigateTo({
					url: '/pages/card/wugong/particulars?fangan=' + index + '&type=' + 'wuyi'
				})
			},
			// A方案两种方式切换
			switchover(index) {
				let self = this
				self.this_index = index;
				self.is_detail = 0;
				if (index == 1) {
					self.$refs.guimodal_mail1.open();
					// uni.showModal({
					// 	title: "物流提示！",
					// 	// content: "邮寄暂停",
					// 	content: "您好，目前的物流费用为预收费用。具体发货时间在4月23日左右，届时职工可在“2025年工会会员五一慰问物资领取券”里查看物流状态更新情况。请勿在微信平台选择投诉，否则将可能影响订单变更为自提领取。仍有疑问可咨询本单位工会或联系客服。",
					// 	showCancel: false,
					// 	success: function(res) {
					// 		if (res.confirm) {
					// 			console.log('用户点击确定');
					// 		} else if (res.cancel) {
					// 			console.log('用户点击取消');
					// 		}
					// 	}
					// })
				}
			},
			notarize_mail1() {
				this.$refs.guimodal_mail1.close();
			},
			notarize_mail2() {
				this.confirmA();
			},
			// 判断该用户的选择券是否通过审核，并确认是否在活动时间内
			audit() {
				let self = this;
				console.log("audit->uuid", this.user.uuid);
				self.$boya.Request({
					url: '/card_availability',
					data: {
						uuid: self.user.uuid,
						card_name: "2025年工会会员五一节日慰问选择券",
					}
				}, function(res) {
					// console.log('auditRes: ', res);
					if (res.code == 200) {
						console.log('audit: ', res.data);
						let startData = new Date('2025/03/28 09:00:00').getTime();
						let currentDate = Date.now();
						// console.log('当前时间: ', currentDate);
						let limitDate = new Date('2025/04/06 23:59:59').getTime();
						// console.log('过期时间: ', limitDate);
						if (startData < currentDate && currentDate < limitDate) {
							self.meantime = 0
							console.log("活动正在进行中");
							uni.pageScrollTo({
								scrollTop: 1250,
								duration: 500,
							});
						} else {
							self.meantime = 1
							console.log("活动未在进行中");
							self.$refs.guimodal2.open();
						}
						if (res.data.status) {
							// res.data.status为1：已审核通过
							// res.data.status为-1：审核不通过通过
							// res.data.status为0：未审核
							self.status = res.data.status
						}
					} else {
						uni.showToast({
							icon: 'error',
							title: res.data
						});
					}
				}, false)
			},
			// 过期提示＋邮寄提示的弹窗close
			guiClose() {
				let self = this
				self.$refs.guimodal2.close();
				uni.pageScrollTo({
					scrollTop: 1400,
					duration: 500,
				});
			},
			// 存储当前的取消时间
			timeStorage() {
				let self = this
				uni.hideLoading();
				// 获取当前时间
				let now = new Date();
				let year = now.getFullYear(); // 年
				let month = now.getMonth() + 1; // 月（注意月份是从0开始的，所以要加1）
				let date = now.getDate(); // 日
				let hours = now.getHours(); // 时
				let minutes = now.getMinutes(); // 分
				let seconds = now.getSeconds(); // 秒
				let newTime = `${year}-${month}-${date} ${hours}:${minutes}:${seconds}`;
				let cancelTime = [];
				cancelTime.push(newTime);
				uni.setStorageSync('cancelTime', cancelTime);
				self.timeLimit();
			},
			// 用户一天内只可修改一次
			timeLimit() {
				let self = this
				let cancelTime = uni.getStorageSync('cancelTime')
				// console.log('cancelTime: ', cancelTime);
				if (cancelTime.length != 0) {
					let updated_at = cancelTime.reverse()
					let currentStamp = new Date().setHours(0, 0, 0, 0) // 当天日期，转换为时间部分为0的时间戳
					let paramStamp = new Date(updated_at[0]).setHours(0, 0, 0, 0) // 传入时间戳，将时间部分转换为0
					if (currentStamp == paramStamp) {
						console.log('取消时间在当天');
						self.today = 0
					} else {
						console.log('取消时间非当天');
						self.today = 1
					}
				} else {
					self.today = 1
				}
			},
			// 新建A方案自提优惠券
			setPlanA() {
				let self = this
				let couponId = []
				let id = [188, 189, 190, 191]
				for (var i = 0; i < id.length; i++) {
					console.log('id[i]：', id[i]);
					let url = '/app/card_bag/coupon_add'
					let parm = {
						coupon_id: id[i],
						status: 0,
						num: 1,
					}
					self.$boya.NPost(url, parm, function(res) {
						console.log("setAadd: ", res.data);
						if (res.data) {
							couponId.push(res.data.id)
						}
					})
				}
				uni.showLoading({
					title: '正在创建优惠券，请稍后...'
				});
				setTimeout(function() {
					if (couponId.length > 0) {
						uni.setStorageSync('couponId', couponId);
						console.log('couponId: ', couponId);
					}
					self.$boya.msg("提交成功");
					self.getData();
				}, 1000);
			},
			// 查询用户是否有B券，若没有则新建一张，方便后台更换方案
			setPlanB() {
				let self = this
				let url = '/app/wallet_log'
				let name = '2025年工会会员五一节日慰问自提券'
				let parm = {
					type: name,
					money: 0.00,
				}
				self.$boya.NPost(url, parm, function(res) {
					console.log('已有自提券：', res);
				}, err => {
					console.log("getBlogErr: ", err);
					let urlB = '/app/wallet_add'
					let parmB = {
						type: name,
						money: 0.00,
					}
					self.$boya.NPost(urlB, parmB, function(res) {
						console.log("setBadd", res.data);
					}, false, false)
				}, false, false)
				self.setPlanA();
			},
			// 页面刷新按钮
			renovate() {
				window.location.reload(true);
			},
			// 查询用户选券情况
			getData() {
				let self = this;
				uni.showLoading({
					title: '加载中...'
				});
				let url = '/app/member_data/list'
				let parm = {
					type: 'wy_2025'
				}
				self.$boya.NGet(url, parm, function(res) {
					console.log('shuju: ', res);
					if (res.data) {
						if (res.data.length > 0) {
							let d = res.data[0];
							self.memberData = d;
							uni.hideLoading();
							if (d.data2 == "0") {
								// 走获取优惠券的接口
								self.get_all_coupon()
							}
							if (d.data2 == "1") {
								d.data3 = JSON.parse(d.data3);
								self.order_id = d.data5;
								// if (d.status != 1) {
								// 	uni.showLoading({
								// 		title: '正在检查支付数据...'
								// 	});
								// 	self.check_pay(false);
								// }
							}
							console.log("memberData: ", self.memberData);
						}
						self.loadedOk = 0
						uni.hideLoading();
					}
				}, err => {
					console.log('err: ', err);
				}, false, false)
			},
			get_all_coupon() {
				let self = this;
				this.$boya.NPost("/app/card_bag/get_all_coupon", {
					type: 1,
				}, function(res) {
					let data = res.data
					for (var i = 0; i < data.length; i++) {
						if (data[i].coupon.activity_type == 'wy_2025') {
							self.couponId.push(data[i].id)
						}
					}
					console.log('优惠券: ', self.couponId);
				}, null, {
					showLoading: false
				});
			},
			// 选择方案赋值
			select(e) {
				let self = this
				if (self.memberData == null || self.memberData.data1 == '用户取消') {
					if (e == 1) {
						self.fanganxuanze = 'A'
					} else if (e == 2) {
						self.fanganxuanze = 'B'
					}
				}
			},
			// 邮寄地址赋值
			address(e) {
				let self = this
				self.message.defaultAddress = e.value
			},
			// 邮寄快递赋值
			change1(e) {
				let self = this
				console.log("e:", e);
				if (!e) {
					self.message.range = ''
				} else if (e === 1) {
					self.message.range = '德邦快递'
				} else if (e === 2) {
					self.message.range = '顺丰快递'
				} else if (e == 3) {
					self.message.range = '邮政快递'
				}
			},
			// 自提地点赋值
			change2(e) {
				let self = this
				if (!e) {
					self.place == ''
				} else if (e == 1) {
					self.place = '非钢大院雀丰商贸公司仓库'
				} else if (e == 2) {
					self.place = '惠享超市-广西钢铁店'
				} else if (e == 3) {
					self.place = '中金公司厂前区办公楼一楼'
				}
			},
			// 选择方案A后的操作，主要是邮寄的必填判断
			ok_A() {
				let self = this
				self.clicks++
				uni.showLoading({
					title: '确认选项中...'
				});
				if (self.this_index == 0) {
					self.openA();
				} else if (self.this_index == 1) {
					if (self.message.name == '' || self.message.phone == '' || self.message.location == '') {
						uni.showToast({
							icon: 'error',
							title: '邮寄信息未填写完成',
						});
						self.clicks--;
					} else if (self.message.range == '') {
						uni.showToast({
							title: '请选择快递类型',
							icon: 'error',
							duration: 3000
						});
						self.clicks--;
					} else {
						if (self.message.defaultAddress[0] == '香港特别行政区' || self.message.defaultAddress[0] ==
							'澳门特别行政区' ||
							self.message.defaultAddress[0] == '台湾省') {
							uni.showToast({
								icon: 'error',
								title: '未开通此网点',
								duration: 3000
							});
							self.clicks--;
						} else if (self.message.range == '德邦快递') {
							self.message.price = self.message.defaultAddress[3]
							self.openA();
						} else if (self.message.range == '顺丰快递') {
							if (self.message.defaultAddress[0] == '西藏自治区') {
								uni.showToast({
									icon: 'error',
									title: "顺丰快递未开通 “西藏自治区” 网点",
									duration: 4000
								});
								self.clicks--;
							} else {
								self.message.price = self.message.defaultAddress[4]
								self.openA();
							}
						} else if (self.message.range == '邮政快递') {
							self.message.price = self.message.defaultAddress[5]
							self.openA();
						}
					}
				}
			},
			// 方案A(邮寄、自提)的再次确认判断
			openA() {
				let self = this
				if (self.this_index == 0) {
					uni.hideLoading();
					uni.showLoading({
						title: '正在确认自提信息...'
					});
					if (self.place == '') {
						uni.showToast({
							title: '请选择自提地点',
							icon: 'error',
							duration: 3000
						});
						self.clicks--;
					} else {
						uni.showModal({
							title: 'A方案：自提',
							content: '自提地点为：' + self.place + '，您确定选择吗？',
							success: function(res) {
								if (res.confirm) {
									self.confirmA();
								} else if (res.cancel) {
									uni.hideLoading();
									self.clicks--
								}
							}
						});
					}
				} else if (self.this_index == 1) {
					uni.hideLoading();
					uni.showLoading({
						title: '正在确认邮寄信息...'
					});
					if (self.message.phone.length < 11 || /^\d+$/.test(self.message.phone) == false) {
						uni.showToast({
							title: '请输入11位数字',
							icon: 'error',
							duration: 3000
						});
						self.clicks--;
					} else if (self.message.location.includes("省") || self.message.location.includes("市") ||
						self.message.location.includes("自治区")) {
						if (self.message.location.includes("省镇") || self.message.location.includes("市镇") ||
							self.message.location.includes("省街道") || self.message.location.includes("市街道") ||
							self.message.location.includes("省乡") || self.message.location.includes("市乡") ||
							self.message.location.includes("省县辖区") || self.message.location.includes("市县辖区") ||
							self.message.location.includes("超市")) {

							uni.hideLoading();
							self.$refs.guimodal_mail2.open();
							// uni.showModal({
							// 	title: "物流提示！",
							// 	content: "您好，目前的物流费用为预收费用。具体发货时间在4月23日左右，届时职工可在“2025年工会会员五一慰问物资领取券”里查看物流状态更新情况。请勿在微信平台选择投诉，否则将可能影响订单变更为自提领取。仍有疑问可咨询本单位工会或联系客服。",
							// 	// showCancel: false,
							// 	success: function(res) {
							// 		if (res.confirm) {
							// 			self.confirmA();
							// 		} else if (res.cancel) {
							// 			uni.hideLoading();
							// 			self.clicks--
							// 			return
							// 		}
							// 	}
							// })
						} else {
							uni.showToast({
								title: '请勿重复填写“省市区”；请勿跨省跨区',
								icon: 'error',
								duration: 5000
							});
							self.clicks--
						}
					} else {
						uni.hideLoading();
						self.$refs.guimodal_mail2.open();
						// uni.showModal({
						// 	title: "物流提示！",
						// 	content: "您好，目前的物流费用为预收费用。具体发货时间在4月23日左右，届时职工可在“2025年工会会员五一慰问物资领取券”里查看物流状态更新情况。请勿在微信平台选择投诉，否则将可能影响订单变更为自提领取。仍有疑问可咨询本单位工会或联系客服。",
						// 	// showCancel: false,
						// 	success: function(res) {
						// 		if (res.confirm) {
						// 			self.confirmA();
						// 		} else if (res.cancel) {
						// 			uni.hideLoading();
						// 			self.clicks--
						// 			console.log('用户点击取消');
						// 		}
						// 	}
						// })
					}
				}
			},
			// A方案走用户选择接口，后新建优惠券
			confirmA() {
				let self = this
				uni.hideLoading();
				self.$refs.guimodal_mail2.close();
				uni.showLoading({
					title: '正在调起选择...'
				});
				let d = {}

				// if (self.astrict == 1) {
				// 	//随机二位小数
				// 	let price = Math.floor(Math.random() * 100);
				// 	self.message.price = price / 100;
				// }

				if (self.this_index == 0) {
					d["data1"] = "A"
					d["data2"] = 0;
					d["data3"] = self.place;
					d["data4"] = null;
					d['data5'] = null;
					d['status'] = null
				} else if (self.this_index == 1) {
					d["data1"] = "A"
					d["data2"] = 1;
					d["data3"] = JSON.stringify({
						name: self.message.name,
						city: self.message.defaultAddress[0] + '-' + self.message.defaultAddress[1] + '-' +
							self.message.defaultAddress[2],
						address: self.message.location,
						phone: self.message.phone,
						price: self.message.price,
					});
					d["data4"] = self.message.range;
					d['status'] = null
				}

				console.log("confirmA", d);
				let url1 = '/app/member_data/add'
				let parm1 = {
					"type": "wy_2025",
					"data": d
				}
				self.$boya.NPost(url1, parm1, function(res) {
					console.log("setA", res);
					if (res.data != null) {
						if (self.this_index === 1) {
							console.log('方案A邮寄');
							self.getData();
						} else if (self.this_index === 0) {
							uni.hideLoading();
							uni.showLoading({
								title: '正在确认方案...'
							});
							self.setPlanB();
						}
					} else {
						console.log('err: ', err);
						self.$boya.msg(err.msg)
					}
				}, err => {
					console.log('err: ', err);
				}, false, false)
			},
			// 是否确认选择B方案
			openB() {
				let self = this
				self.clicks++
				uni.showModal({
					title: 'B方案',
					content: '您确定选择吗？',
					success: function(res) {
						if (res.confirm) {
							uni.showLoading({
								title: '正在确认方案...'
							});
							self.confirmB();
						} else {
							self.clicks--
						}
					}
				});
			},
			// 确认选择B方案后走用户选择接口，后新建卡券
			confirmB() {
				let self = this;
				uni.hideLoading();
				uni.showLoading({
					title: '正在调起选择...'
				});
				let d = {}
				d["data1"] = "B"
				d["data2"] = null;
				d["data3"] = null;
				d["data4"] = null;
				d['data5'] = null;
				d['status'] = null
				let url1 = '/app/member_data/add'
				let parm1 = {
					"type": "wy_2025",
					"data": d
				}
				self.$boya.NPost(url1, parm1, function(res) {
					console.log("setB", res);
					let url2 = '/app/wallet_add'
					let parm2 = {
						type: '2025年工会会员五一节日慰问自提券',
						money: 200,
					}
					self.$boya.NPost(url2, parm2, function(res) {
						uni.hideLoading();
						console.log("setBadd", res.data);
						self.$boya.msg("提交成功");
						self.getData();
					})
				}, err => {
					console.log('err: ', err);
					self.$boya.msg(err.msg)
				}, false, false)
			},
			// 确认支付
			confirm_pay() {
				let self = this
				self.$refs.guimodal1.close();
				uni.showLoading({
					title: '正在确认物流信息...'
				});
				self.to_pay();
			},
			// 取消支付
			cancel_pay() {
				let self = this
				self.$refs.guimodal1.close();
				self.$boya.msg('您已取消支付');
				// uni.showModal({
				// 	title: '温馨提示',
				// 	content: '请职工尽快支付邮费，2024年12月30日后将自动变为A套餐-非钢大院雀丰商贸工资仓库自提。',
				// 	showCancel: false,
				// 	success: function(res) {
				// 		if (res.confirm) {
				// 			uni.hideLoading();
				// 			return
				// 		}
				// 	},
				// })
			},
			// 邮费确认选择
			pay_confirm() {
				let self = this
				let startData = new Date('2025/04/09 09:00:00').getTime();
				console.log('开始时间: ', startData);
				let currentDate = Date.now();
				console.log('当前时间: ', currentDate);
				let limitDate = new Date('2025/04/17 23:59:59').getTime();
				console.log('过期时间: ', limitDate);
				if (startData < currentDate && currentDate < limitDate) {
					uni.showLoading({
						title: '正在查询物供信息...'
					});
					self.$boya.NPost("/app/member_data/edit", {
						id: self.memberData.id,
						data: {
							code: self.user.lg_id
						}
					}, function(res) {
						console.log("edit", res);
						uni.hideLoading();
						self.$refs.guimodal1.open();
					})
					console.log("在支付时间内");
				} else {
					uni.showModal({
						title: "提示",
						content: "不在支付时间内。支付时间为：2025年4月9日09:00:00~2025年4月17日23:59:59。",
						showCancel: false,
						success: function(res) {
							if (res.confirm) {
								console.log('用户点击确定');
							}
						}
					})
					console.log("不在支付时间内");
				}
			},
			// 邮寄支付
			to_pay(md_id = null) {
				let self = this;
				let price = null;
				if (self.message.price) {
					price = self.message.price
				} else {
					price = self.memberData.data3.price
				}
				console.log("memberData", self.memberData);
				uni.hideLoading();
				uni.showLoading({
					title: '正在支付...'
				});
				if (self.memberData) {
					if (self.memberData.data5 != "" && self.memberData.data5 != null) {
						console.log("已经创建过订单，直接跳转支付=>id:" + self.memberData.data5);
						let appid = "gh_a6986a2f785e";
						// let merchant_id = "JF-EPAY2019062100960"; //商户号-博亚
						let merchant_id = "JF-EPAY2024051619799"; //商户号-雀丰
						let path = "page/containers/payment/query-input/query-input?code=" + merchant_id;
						uni.hideLoading();
						// #ifdef H5
						console.log("H5H5H5H5H5H5H5H5");
						uni.webView.postMessage({
							data: {
								type: "open_wexin",
								data: {
									app_id: appid,
									path: path,
									identification: 'indexWy'
								}
							},
						})
						// #endif
						// #ifdef APP-PLUS
						console.log("APP-PLUSAPP-PLUSAPP-PLUS");
						sweixin ? sweixin.launchMiniProgram({
							id: appid,
							path: path
						}) : plus.nativeUI.alert('当前环境不支持微信操作!');
						// #endif
					} else {
						console.log('走到了支付else');
						if (md_id == null && self.memberData != null) {
							md_id = self.memberData.id;
						}
						let data = {
							"type": "member_data",
							"link_id": md_id, //member_data的id
							"app_id": "wx89eed701638e3a19", // 博亚众创
							"money": price,
							"body": "2025五一物供快递费"
						};
						// console.log("add_order->data", data);
						self.$boya.NPost("/wexin/add_order", data, function(res) {
							// console.log("add_order->res", res);
							if (res.code == 200) {
								self.order_id = res.data.id;
								// console.log('支付order_id: ', self.order_id);
								let appid = "gh_a6986a2f785e";
								// let merchant_id = "JF-EPAY2019062100960"; //商户号-博亚
								let merchant_id = "JF-EPAY2024051619799"; //商户号-雀丰
								let path = "page/containers/payment/query-input/query-input?code=" + merchant_id;
								self.$boya.NPost("/app/member_data/edit", {
									id: md_id,
									data: {
										data5: res.data.id
									}
								}, function(res) {
									uni.hideLoading();
									self.getData();
									// #ifdef H5
									console.log("H5H5H5H5H5H5H5H5");
									uni.webView.postMessage({
										data: {
											type: "open_wexin",
											data: {
												app_id: appid,
												path: path,
												identification: 'indexWy'
											}
										},
									})
									// #endif
									// #ifdef APP-PLUS
									console.log("APP-PLUSAPP-PLUSAPP-PLUS");
									sweixin ? sweixin.launchMiniProgram({
										id: appid,
										path: path
									}) : plus.nativeUI.alert('当前环境不支持微信操作!');
									// #endif
								})
							}
						})
						console.log(sweixin);
					}
				}
			},
			// 用户取消选择操作，一天只允许修改一次（需要进行删券及取消选择的操作）
			cancel() {
				let self = this
				uni.showModal({
					title: '提示',
					content: '一天只可修改一次，您确认取消吗？',
					success: function(res) {
						if (res.confirm) {
							if (self.memberData.status == 1) {
								console.log('邮寄');
								uni.showLoading({
									title: '正在查询支付信息...'
								});
								self.confirm();
							} else {
								console.log('非邮寄');
								uni.showLoading({
									title: '正在查询选择方案...'
								});
								let url = '/app/member_data/remove'
								let parm = {
									id: self.memberData.id,
								}
								self.$boya.NPost(url, parm, function(res) {
									uni.hideLoading();
									console.log("confirm1->res", res);
									console.log("memberData: ", self.memberData);
									// return;
									if (res.data) {
										if (self.memberData.data1 == 'A') {
											if (self.memberData.data2 == 0) {
												self.removeA()
											} else if (self.memberData.data2 == 1) {
												uni.showLoading({
													title: '正在取消...'
												});
												self.$boya.msg('取消成功！');
												self.timeStorage();
												setTimeout(function() {
													window.location.reload(true);
												}, 500);
											}
										}
										if (self.memberData.data1 == 'B') {
											self.removeB(200)
										}
									}
								}, err => {
									console.log('err: ', err);
									self.$boya.msg(err.msg)
								}, false, false)
							}
						} else if (res.cancel) {
							console.log('取消');
						}
					}
				});
			},
			// 方案A删优惠券
			removeA() {
				console.log('走到removeA');
				let self = this
				let couponId = self.couponId
				for (var i = 0; i < couponId.length; i++) {
					let urlA = '/app/card_bag/coupon_remove'
					let parmA = {
						id: couponId[i]
					}
					self.$boya.NPost(urlA, parmA, function(res) {
						console.log("setAremove: ", res.data);
					})
				}
				setTimeout(function() {
					self.removeB(0.00);
				}, 1000);
			},
			// 方案B删卡券
			removeB(price) {
				console.log('走到removeB');
				let self = this
				uni.hideLoading();
				uni.showLoading({
					title: '正在取消...'
				});
				let couponId = uni.getStorageSync("couponId");
				if (couponId) {
					uni.removeStorageSync('couponId');
				}
				let url = '/app/wallet_remove'
				let parm = {
					type: '2025年工会会员五一节日慰问自提券',
					money: price,
				}
				self.$boya.NPost(url, parm, function(res) {
					console.log("setBremove", res.data);
					self.$boya.msg('取消成功！');
					self.timeStorage();
					window.location.reload(true);
				})
			},
			// 邮寄退款操作
			confirm() {
				let self = this;
				uni.hideLoading();
				uni.showLoading({
					title: '正在调起退款...'
				});
				// member_data/refund
				let url = '/app/member_data/remove'
				let parm = {
					id: self.memberData.id,
				}
				self.$boya.NPost(url, parm, function(res) {
					uni.hideLoading();
					console.log("confirm1->res", res);
					self.$boya.msg('退款成功!');
					self.timeStorage();
					setTimeout(function() {
						window.location.reload(true);
					}, 500);
					//window.location.reload(true);
				}, err => {
					console.log('err: ', err);
					self.$boya.msg(err.msg)
				}, false, false)
			},
			// 使用物流单号查询物流情况
			logistics() {
				let self = this
				console.log('单号：', self.memberData);
				if (!self.memberData.courier_number) {
					uni.showToast({
						title: '没有物流信息',
						duration: 2000,
						icon: 'error'
					});
				} else {
					if (self.memberData.courier_number.includes("sf") || self.memberData.courier_number.includes("SF")) {
						self.SF_courier_umber = self.memberData.courier_number
						self.$refs.guimodal_courier_umber.open();
					} else {
						uni.navigateTo({
							url: "/pages/card/wugong/logistics?danhao=" + self.memberData.courier_number +
								'&dizhi1=' + self.memberData.data3.city + '&dizhi2=' + self.memberData.data3
								.address + '&phone=' + self.memberData.data3.phone
						})
					}

				}
			},
			courier_umber_notarize() {
				let self = this
				self.$refs.guimodal_courier_umber.close();
			},
		}
	}
</script>

<style>
	.content {
		background-color: #FF1118;
		/* background: linear-gradient(to right, #FF111D, #FF3334); */
	}

	.tupian {
		width: 100%;
	}

	.tupian>img {
		width: 100%;
	}

	.zhongjian {
		padding-bottom: 20rpx;
	}

	.xuanxiang {
		display: flex;
		margin-bottom: 10rpx;
	}

	.kuai {
		width: 100%;
	}

	.kuai>button {
		width: 280rpx;
		height: 78rpx;
		line-height: 78rpx;
		font-size: 32rpx;
		color: black;
		margin: 0 auto;
		margin-top: 30rpx;
		text-align: center;
		background-color: #FFEA9E;
		margin-bottom: 18rpx;
	}

	.kuai>image {
		width: 92%;
		border-radius: 15rpx;
		margin-left: 15rpx;
		box-shadow: 8px 8px 5px rgba(0, 0, 0, 0.5);
	}

	.queren {
		width: 350rpx;
		height: 80rpx;
		line-height: 80rpx;
		font-size: 35rpx;
		margin: 0 auto;
		margin-top: 30rpx;
		text-align: center;
		background-color: #FFEA9E;
	}

	.queren1 {
		width: 450rpx;
		height: 80rpx;
		line-height: 80rpx;
		font-size: 35rpx;
		margin: 0 auto;
		margin-top: 30rpx;
		text-align: center;
		border-radius: 20rpx;
		background-color: #FFEA9E;
	}

	.pickUp {
		width: 590rpx;
		padding: 25rpx 40rpx;
		margin: 0 auto;
		border-radius: 15rpx;
		background: url('https://boyaltd.oss-cn-hangzhou.aliyuncs.com/new_app/gift/wy2025/bj2.jpg') 100% 100% / 100% 100%;
	}

	.mail {
		width: 600rpx;
		margin: 0 auto;
		border-radius: 15rpx;
		padding: 20rpx 12rpx 20rpx 20rpx;
		background: url('https://boyaltd.oss-cn-hangzhou.aliyuncs.com/new_app/gift/wy2025/bj1.jpg') 100% 100% / 100% 100%;
	}

	.form {
		width: 90%;
		margin: 0 auto;
		padding-top: 50rpx;
		font-size: 30rpx;
	}

	.form>view {
		margin-top: 30rpx;
		margin-bottom: 30rpx;
	}

	.xlk {
		display: flex;
		align-items: center;
	}

	.ztdidian {
		display: flex;
		align-items: center;
		margin: 80rpx 0 40rpx 0;
	}

	.psfs {
		display: flex;
		align-items: center;
	}

	.fangshi {
		font-size: 32rpx;
		border: 1px solid white;
		border-radius: 12rpx;
		margin-left: 70rpx;
		color: white;
		margin-right: 10rpx;
	}

	.this_bg {
		border: 5px solid white;
		padding: 12rpx 33rpx 12rpx 33rpx;
	}

	.defu_bg {
		color: black;
		background-color: white;
		padding: 15rpx 36rpx 15rpx 36rpx;
	}

	.ziti {
		width: 100%;
	}

	.ziti>img {
		width: 100%;
	}

	.youji>view {
		margin-top: 40rpx;
		margin-bottom: 40rpx;
	}

	.quyu {
		display: flex;
		align-items: center;
	}

	.heng {
		display: flex;
		align-items: center;
	}

	.heng>text,
	.text {
		width: 175rpx;
		color: white;
	}

	.diqu {
		display: flex;
		align-items: center;
	}

	.diqu1 {
		max-width: 40%;
		/* （文字长度超出限定宽度，则隐藏超出的内容） */
		overflow: hidden;
		/* （设置文字在一行显示，不能换行） */
		white-space: nowrap;
		/* （规定当文本溢出时，显示省略符号来代表被修剪的文本） */
		text-overflow: ellipsis;
	}

	.diqu2 {
		max-width: 35%;
		/* （文字长度超出限定宽度，则隐藏超出的内容） */
		overflow: hidden;
		/* （设置文字在一行显示，不能换行） */
		white-space: nowrap;
		/* （规定当文本溢出时，显示省略符号来代表被修剪的文本） */
		text-overflow: ellipsis;
	}

	.diqu3 {
		max-width: 25%;
		/* （文字长度超出限定宽度，则隐藏超出的内容） */
		overflow: hidden;
		/* （设置文字在一行显示，不能换行） */
		white-space: nowrap;
		/* （规定当文本溢出时，显示省略符号来代表被修剪的文本） */
		text-overflow: ellipsis;
	}

	.heng>input,
	.diqu {
		width: 480rpx;
		padding: 15rpx 20rpx 15rpx 20rpx;
		border-radius: 12rpx;
		background-color: white;
	}

	.view_bk {
		width: 380rpx;
		height: 380rpx;
		margin: 0 auto;
		background-size: 100% 100%;
		display: flex;
		align-items: center;
		justify-content: center;
		border: 20px solid white;
		border-radius: 30rpx;
	}

	.tanchuang {
		width: 480rpx;
		margin: 0 auto;
		padding: 20rpx;
		border-radius: 10rpx;
		background-color: rgba(255, 255, 255, 0.8);
	}
</style>